/* stylelint-disable at-rule-no-unknown */
@import url('./overwrite.less');

@tailwind base;
@tailwind utilities;

html {
  font-size: 16px;
}

html,
body {
  // 参考 tailwindcss font-sans 定义：https://tailwindcss.com/docs/font-family
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    'Segoe UI', 'Helvetica Neue', Arial, 'Noto Sans', sans-serif,
    'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  overflow: hidden;
}

.app-container {
  width: 100vw;
  height: 100vh;
  box-sizing: border-box;
  overflow: hidden;
}

a:hover {
  color: theme('colors.primary');
}

// Link 组件 disabled 禁用样式
.disable-link {
  pointer-events: none;
  cursor: not-allowed;
  text-decoration: none;
  color: theme('colors.disable');
}

// global
.page-container {
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.app-main-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  overflow-x: auto !important;

  > :not(.clear-main-width) {
    flex: none;
    width: 100%;
    min-width: 1080px;
  }
}

.root-load {
  margin: auto;
}

/*
* 冻结列样式
*/
.catalog-wrapper,
.template-wrapper,
.automated-feed-wrapper,
.template-list-wrapper,
.history-log-wrapper {
  .ant-table-cell-fix-left-last {
    &::after {
      box-shadow: inset 10px 0 8px -8px #00000026;
    }
  }
}

// PageHeader 组件样式覆盖
.cp-page-header {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
  box-sizing: border-box;

  &>.ant-page-header-content {
    box-sizing: border-box;
    padding: 16px;
    display: flex;
    flex-direction: column;
  }

  & .ant-page-header-heading {
    height: 72px;
    padding: 24px 22px;

    background-color: #fff;
  }

  & .ant-page-header-heading-left {
    margin: 0;
  }

  & .ant-page-header-heading-title {
    line-height: 1.15;
    font-size: 18px;
  }

  & .ant-page-header-heading-extra {
    margin: 0;

    flex: 1;
    display: flex;
    justify-content: flex-end;
  }

  // 移除分页器底部的间距
  .ant-table-pagination.ant-pagination {
    margin-bottom: 0;

    .ant-pagination-options-quick-jumper {
      margin-right: -8px;
    }
  }
}

// Card 组件样式覆盖
.cp-card {
  box-shadow: 0 1px 4px rgb(74 74 78 / 16%);
  border-radius: 2px;

  &>.ant-card-body {
    padding: 24px;
  }
}